home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / sem_getvalue.z / sem_getvalue
Encoding:
Text File  |  2002-10-03  |  2.8 KB  |  66 lines

  1.  
  2.  
  3.  
  4. sssseeeemmmm____ggggeeeettttvvvvaaaalllluuuueeee((((3333CCCC))))                                              sssseeeemmmm____ggggeeeettttvvvvaaaalllluuuueeee((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_eeee_mmmm______gggg_eeee_tttt_vvvv_aaaa_llll_uuuu_eeee - get the value of a posix named or unnamed semaphore
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_eeee_mmmm_aaaa_pppp_hhhh_oooo_rrrr_eeee_...._hhhh_>>>>
  13.      _iiii_nnnn_tttt _ssss_eeee_mmmm______gggg_eeee_tttt_vvvv_aaaa_llll_uuuu_eeee_((((_ssss_eeee_mmmm______tttt _****_s_e_m_,,,, _iiii_nnnn_tttt _****_v_a_l_u_e_))))_;;;;
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _ssss_eeee_mmmm______gggg_eeee_tttt_vvvv_aaaa_llll_uuuu_eeee obtains the current value of the semaphore located at
  17.      address _s_e_m, and stores it at address _v_a_l_u_e. The returned value should be
  18.      viewed as a snapshot only, useful for debugging.
  19.  
  20.      If the number stored at _v_a_l_u_e is positive, then the semaphore is
  21.      available.  If the number stored at _v_a_l_u_e is zero, then the semaphore is
  22.      not available.  If the number stored at _v_a_l_u_e is negative, then the
  23.      semaphore is not available and the absolute value of the number
  24.      represents the number of processes currently blocked on the semaphore.
  25.  
  26.      The address _s_e_m may reside anywhere in the calling processes address
  27.      space, but the process must have read and write access to _s_e_m.
  28.  
  29.      _ssss_eeee_mmmm______gggg_eeee_tttt_vvvv_aaaa_llll_uuuu_eeee will fail if the following is true:
  30.  
  31.      [EINVAL]    The semaphore located at address _s_e_m is not a valid posix
  32.                  named or unnamed semaphore.
  33.  
  34. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  35.      sem_init(3C), sem_destroy(3C), sem_getvalue(3C), sem_post(3C),
  36.      sem_wait(3C), sem_trywait(3C), sem_open(3C), sem_close(3C),
  37.      sem_unlink(3C),
  38.  
  39. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  40.      Upon successful completion, a value of 0 is returned to the calling
  41.      process. Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
  42.      indicate the error.
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.